<!DOCTYPE html>
<html>

<head>
    <include file="Share:meta" />
    <style type="text/css">
    .info-box-text {
        color: #777;
    }
    
    .info-box-number {
        font-size: 22px;
        color: #333;
    }
	
	.trstyle0 {
        background-color: #e8e8e8;
    }
    .noty_message_h{ height: 50px; padding: 15px; }
    .noty_text{ font-size: 16px; font-weight: bold; }
    .desc{ font-size: 12px; color: #999; }

    .tr_status_0{ background-color: #eee; }
    .tr_history{ border-bottom: 5px solid #e0e0e0; }
    </style>
    
</head>

<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <include file="Share:header" />
        <include file="Share:left" />
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
            </section>
            <!-- Main content -->
            <section class="content">
                
                
                
                <div class="row">
                    <div class="col-xs-12">
                        <div class="box">
                            <div class="box-header with-border">
                                <h3 class="box-title">提现列表</h3>
                            </div>
                            <!-- /.box-header -->
                            <div class="box-body">
                                <table class="table table-bordered">
                                    <tbody>
                                        <tr>
                                            <th style="width:300px;">用户</th>
                                            <th style="width:200px;">银行信息</th>
                                            <th style="text-align:right;">提现</th>
                                            <th style="width:200px; text-align:right;">时间</th>
                                            <th style="text-align:right;">提现状态</th>
                                        </tr>
                                        <notempty name="list">
                                        <volist name="list" id="vo">
                                        <tr class="tr_status_{$vo.status}">
                                            <td>
                                                <if condition="$vo.uid neq 0"><button type="button" class="btn label-success btn-xs">[ {$vo.uid} ] 代理商</button>
                                                <elseif condition="$vo.cid neq 0"/><button type="button" class="btn btn-info btn-xs">[ {$vo.cid} ] 顾&nbsp;&nbsp;&nbsp;&nbsp;客</button>
                                                <else/>---
                                                </if>

                                            	<if condition="$vo.uid neq 0">{$vo.u_username}<br/>{$vo.u_name}
                                                <elseif condition="$vo.cid neq 0"/>{$vo.c_mobile}<br/>{$vo.c_name}
                                                <else/>---
                                                </if>
											</td>
                                            
                                            <td>{$vo.bank}<br/>{$vo.cardname}<br/>{$vo.cardno}</td>
                                            <td style="text-align:right;"><b>&yen;{$vo.money}</b></td>
                                            <td style="text-align:right;">
                                            	申请：{$vo.ctime}<eq name="vo.status" value="1"><br/>完成：{$vo.dtime}</eq><eq name="vo.status" value="2"><br/>处理：{$vo.dtime}</eq>
                                            </td>
                                            <td style="text-align:right;">
                                            	<eq name="vo.status" value="0">
                                                <span style="color:#f00;" >处理中</span><br/>
                                                <div><button type="button" class="btn btn-info btn-xs" style="margin-top:8px;" onClick="changesuccess('{$vo.id}')">提现完成</button></div>
                                                <div><a class="btn btn-info btn-xs btn-danger" style="margin-top:8px;" href="__APP__/Admin/cash/checkback/id/{$vo.id}/p/{$Think.get.p|default=1}">提现失败</a></div>
                                                </eq>
                                                <eq name="vo.status" value="1">
                                                已完成
                                                </eq>
                                                <eq name="vo.status" value="2">
                                                <span title="{$vo.note}">提现失败</span>
                                                </eq>
                                            </td>
                                        </tr>

                                        <notempty name="vo.cash_history">
                                            <tr class="tr_status_{$vo.status} tr_history">
                                                <td colspan="5">
                                                    <h4>该用户近期余额变动记录</h4>
                                                    <table class="table table-hover">
                                                        <thead>
                                                            <tr>
                                                                <th>变动类型</th>
                                                                <th>变动前</th>
                                                                <th>变动金额</th>
                                                                <th>变动后</th>
                                                                <th>备注</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <volist name="vo.cash_history" id="vo1">
                                                                <tr>
                                                                    <td>{$vo1.action}</td>
                                                                    <td>{$vo1.before}</td>
                                                                    <td>{$vo1.add}</td>
                                                                    <td>{$vo1.after}</td>
                                                                    <td>{$vo1.msg}</td>
                                                                </tr>
                                                            </volist>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                        </notempty>
                                            

                                        </volist>
                                        <else/>
                                        <tr>
                                            <td colspan="6" align=""> 暂时没有提现记录 </td>
                                        </tr>
                                        </notempty>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.box-body -->
                            <div class="box-footer clearfix">
                                <ul class="pagination pagination-sm no-margin pull-right">
                            		{$show}
                        		</ul>
                            </div>
                        </div>
                        <!-- /.box -->
                    </div>
                </div>
                
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->
        <include file="Share:copyright" />
        <include file="Share:setting" />
    </div>
    <include file="Share:js" />

<script type="text/javascript">
$("#AdminManager").addClass("active");
$("#Cash").addClass("active");

function changesuccess(cash_id) {
	noty({
		text: '您确定要修改吗？',
		layout: 'center',
		template: '<div class="noty_message_h"><span class="noty_text"></span><div class="noty_close"></div></div>',
		buttons: [{
			addClass: 'btn btn-primary',
			text: '确定',
			onClick: function($noty) {
				// this = button element 也就是当前的按钮
				// $noty = $noty element 也就是当前这个提示信息对象
				$noty.close();
				window.location.href="__APP__/Admin/cash/dispose/id/"+cash_id+"/p/{$Think.get.p|default=1}";
			}
		}, {
			addClass: 'btn btn-danger',
			text: '取消',
			onClick: function($noty) {
				$noty.close();
			}
		}]
	});
}
</script>


</body>

</html>
